package com.example.myapplication

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.widget.Toast
import kotlinx.android.synthetic.main.activity_sixth.*

class SixthActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_sixth)
        val stuno=intent.getStringExtra("stuno")
        val stuname=intent.getStringExtra("stuname")
        val classes=intent.getStringExtra("classes")
        val department=intent.getStringExtra("department")
        val tel=intent.getStringExtra("tel")
        val gender=intent.getStringExtra("gender")
        val dormno=intent.getStringExtra("dormno")
        val photopath=intent.getStringExtra("photopath")
        stuno1.text=stuno
        stuname1.setText(stuname)
        classes1.setText(classes)
        department1.setText(department )
        tel1.setText(tel)
        gender1.setText(gender)
        dormno1.setText(dormno)
        if(gender=="女"){
        photopath1.setImageResource(R.drawable.girl)}
        if(gender=="男"){
            photopath1.setImageResource(R.drawable.boy)
        }
button3.setOnClickListener(){
    Toast.makeText(this,"功能未完善",Toast.LENGTH_LONG).show()
}
        button4.setOnClickListener(){
            finish()
        }
    }
}